import 'package:flutter/material.dart';
import 'package:honeypotflutter/publicBussine/bussine_colors.dart';
import 'package:honeypotflutter/publicBussine/bussine_font.dart';

class DeliverOrderTextfield extends StatelessWidget {
  final String title;
  final String hintText;
  final TextEditingController? controller;
  final FocusNode? node;
  final bool enabled;
  const DeliverOrderTextfield({super.key, this.title = "快递单号", this.hintText = "", this.controller, this.node, this.enabled = true});

  @override
  Widget build(BuildContext context) {
    return Container(
      padding: EdgeInsets.only(top: 12),
      child: Column(
        children: [
          Text(
            title,
            style: TextStyle(
              color: MGColors.text1Color,
              fontSize: MGFont.textFont1,
              fontWeight: FontWeight.bold,
            ),
          ),
          SizedBox(height: 10),
          TextField(
            style: TextStyle(color: MGColors.text1Color),
            focusNode: node,
            enabled: enabled,
            controller: controller,
            decoration: InputDecoration(
              hintText: hintText,
              hintStyle: TextStyle(color: MGColors.text3Color),
              enabledBorder: OutlineInputBorder(borderSide: BorderSide(color: MGColors.splitColor, width: 1), borderRadius: BorderRadius.circular(8)),
              focusedBorder: OutlineInputBorder(borderSide: BorderSide(color: MGColors.splitColor, width: 1), borderRadius: BorderRadius.circular(8)),
              border: OutlineInputBorder(borderSide: BorderSide(color: MGColors.splitColor, width: 1), borderRadius: BorderRadius.circular(8)),
            ),
          )
          // Expanded(child: TextField())
        ],
        crossAxisAlignment: CrossAxisAlignment.start,
        mainAxisSize: MainAxisSize.min,
      ),
    );
  }
}
